package com.xuecheng.auth.api;

import com.xuecheng.auth.model.po.Company;
import com.xuecheng.auth.service.CompanyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags="机构管理")
@RestController
@RequestMapping("/company")
public class CompanyController {
    @Autowired
    CompanyService companyService;

    @ApiOperation("根据id查询机构")
    @GetMapping("/{id}")
    public Company getById(@PathVariable String id){
        return companyService.getById(id);
    }
}
